import Vue from 'vue';
import Router from 'vue-router';
import Layout from '@/layout';

//使用router
Vue.use(Router);

//向外暴露成员
export default new Router({
    routes: [{
        path: '',
        component: Layout,
        children: [{
                path: '',
                component: () =>
                    import ('@/views/content/homeContent')
            },
            {
                path: '/home',
                name: 'homecontent',
                component: () =>
                    import ('@/views/content/homeContent'),
            },
            {
                path: '/list',
                name: 'listcontent',
                component: () =>
                    import ('@/views/content/listContent'),
            },
            {
                path: '/search',
                name: 'searchcontent',
                component: () =>
                    import ('@/views/content/searchContent'),
            }
        ]

    }, {
        path: '/login',
        component: () =>
            import ('@/views/login')
    }, {
        path: '/register',
        component: () =>
            import ('@/views/register')
    }]
})